Skip to content

feat: optional status tags in sidebar (closes #22)#105

Merged
gavmck merged 10 commits into
mainfrom
feature/sidebar-status-tags
Apr 30, 2026
Merged

feat: optional status tags in sidebar (closes #22)#105
gavmck merged 10 commits into
mainfrom
feature/sidebar-status-tags

Conversation

@gavmck

@gavmck gavmck commented Apr 30, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds a new status.sidebarTags config ('single' | 'multiple' | 'none') that renders full status tags in the sidebar instead of dots.
  • Refactors StatusTag into a presentational StatusTagBase so the toolbar and sidebar share rendering. The sidebar variant is slightly smaller (10px font, 16px line-height, 0.4em horizontal padding).
  • When sidebarTags is unset, the existing sidebarDots behaviour is preserved exactly. Sidebar tags are always rendered as <span> (URLs are still respected by the toolbar tag).

Closes #22.

Test plan

  • Default (no sidebarTags, no sidebarDots): single dot per story.
  • sidebarDots: 'multiple' (no sidebarTags): multiple dots per story.
  • sidebarTags: 'single': one sidebar tag per story (first matching status), no dots.
  • sidebarTags: 'multiple': a sidebar tag for every matching status, no dots.
  • sidebarTags: 'none': no indicator, even with sidebarDots: 'multiple' set.
  • Sidebar tag is rendered as <span> even when the status has a url (Button stories have one set).
  • Toolbar tag is unchanged (still renders as <a> for statuses with a url).
  • Hovering a sidebar tag shows the status description via the native title tooltip.
  • Custom statuses defined in .storybook/manager.js render with the configured colours.
  • Long-ish status names (e.g. customStatus → "Custom Status") don't break the row layout.

gavmck added 10 commits April 30, 2026 10:12
Adds the design document for issue #22 — a new `sidebarTags` config
option that renders full status tags in the sidebar (slightly smaller
than the toolbar tag) instead of the existing dots.
Variant-aware (toolbar | sidebar) presentational status tag. Renders
either a span or an anchor depending on variant + url. Internalises
the defaults-fallback logic and label start-casing.

Refs #22
The toolbar StatusTag now delegates rendering to the new
StatusTagBase presentational component. No public behaviour change.

Refs #22
Thin wrapper around StatusTagBase fixing variant="sidebar" and
omitting url so sidebar tags are always rendered as spans.

Refs #22
Adds a new \`status.sidebarTags\` config ('single' | 'multiple' |
'none') that, when set, renders SidebarStatusTag components in the
sidebar instead of dots. When unset, the existing sidebarDots
behaviour is preserved exactly.

Closes #22
Storybook's sidebar already handles spacing between the label and
right-aligned slot content, so the explicit margin-left on StatusDot
and the sidebar variant of StatusTagBase was producing a double gap.

Refs #22
Local planning artefacts; not needed in the published history.

Refs #22
@sonarqubecloud

Copy link
Copy Markdown

Comment thread Readme.md
@gavmck gavmck merged commit 80c2ee3 into main Apr 30, 2026
9 checks passed
@gavmck gavmck deleted the feature/sidebar-status-tags branch April 30, 2026 13:54
@github-actions

github-actions Bot commented May 1, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 8.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

Customize the bullet located on the left menu

2 participants